//
//  MXBlackCell.m
//  CatchBear
//
//  Created by 公司电脑 on 2019/1/24.
//  Copyright © 2019年 王启颖. All rights reserved.
//

#import "MXBlackCell.h"

@interface MXBlackCell ()

@property (weak, nonatomic) IBOutlet UILabel *nickNameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *avatarImageView;

@end
@implementation MXBlackCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(User *)model{
    _model = model;
    self.nickNameLabel.text = model.user_nickname;
    [self.avatarImageView sd_setImageWithURL:[NSURL URLWithString:model.user_headimg] placeholderImage:[UIImage imageNamed:@"头像"]];
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    
    MXBlackCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell = NSbunleloadNibName(@"MXBlackCell");
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
    
    return cell;
}

@end
